#  多返回值
# def return_num():
#     return 1, 'sfg', True
#
#
# x, y, z = return_num()
# print(x, y, z)


# 不定长参数传递
# 位置传递
# def user_info(*args):
#     print(args)
#
#
# user_info('TOM')
# user_info('TOM', 19, '男')
#
#
# # 关键字传递
# def user_info2(**kwargs):
#     print(kwargs)
#
#
# user_info2(name='TOM',age=18,id=110)


# 函数作为参数传递
# def test_func(compute):
#     result = compute(1,2)
#     print(result)
#
# def compute(num1,num2):
#     return num1+num2
#
# test_func(compute)


# lambda匿名函数
def func2(compute):
    ret = compute(1,2)
    print(ret)

# 注意lambda只支持写一行代码
func2(lambda x,y:x-y)





